/**
 * 在主框架内显示
 * 路由配置说明
 * {
      path: '/dir-console-info',    // 页面地址（唯一）
      name: 'dir-console-info',     // 页面名称（唯一）
      hidden: false,              // 隐藏（不展示在侧边栏菜单）
      meta: {
          title: '用户管理',       // 页面标题
          icon: 'yonghuguanli',  // 页面图标
          cache: true,          // 页面是否进行缓存 默认true
          link: false,           // 页面是否是外链 默认false
          frameSrc: false,       // 页面是否是内嵌 默认false
          requiresAuth: true,   // 页面是否是需要登录 默认true
          perms: [               // 页面的操作的权限列表
              'sys:users:list',   // 查询
              'sys:users:create', // 增加
              'sys:users:update', // 更新
              'sys:users:delete', // 删除
          ],
      },
      component: () => import('@/views/sys/users/dir-users-info.vue'),// 懒加载页面组件
   }
 *
 */

/**
 * 控制中心路由 // 默认路由全部展开 1级二级都可以点击  所以采用正常布局
 */
const frameControl = [
    {
        path: '/control',
        redirect: { name: 'control' },
        component: () => import('@/layout/control.vue'),
        children: [
            {
                path: '/home',
                name: 'Home',
                meta: {
                    cache: true,
                    title: 'GPU实例',
                    icon: 'icon_menu_gpu',
                    requiresAuth: true,
                },
                component: () => import('@/views/console/home/index.vue')
            },
            {
                path: '/gpuInstance',
                name: 'GpuInstance',
                meta: {
                    cache: true,
                    title: 'GPU实例',
                    requiresAuth: true,
                },
                children: [
                    {
                        path: '/communityCloud',
                        name: 'CommunityCloud',
                        meta: {
                            title: '社区云',
                            icon: 'icon_menu_cloud',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/gpuInstance/communityCloud/index.vue')
                    },
                    {
                        path: '/highlyAvailableCloud',
                        name: 'HighlyAvailableCloud',
                        meta: {
                            title: '高可用云',
                            icon: 'icon_menu_high_cloud',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/gpuInstance/highlyAvailableCloud/index.vue')
                    },
                ]
            },
            {
                path: '/personalSpace',
                name: 'PersonalSpace',
                meta: {
                    title: '个人空间',
                    icon: 'icon_menu_person',
                    requiresAuth: true
                },
                component: () => import('@/views/console/personalSpace/index.vue'),
            },
            {
                path: '/instance',
                name: 'instance',
                meta: {
                    title: '实例',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/instance',
                        name: 'Instance',
                        meta: {
                            cache: true,
                            title: '实例管理',
                            icon: 'icon_menu_instance',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/instanceManage/instance/index.vue')
                    },
                    {
                        path: '/instanceMonitoring',
                        name: 'InstanceMonitoring',
                        hidden: true,
                        meta: {
                            cache: true,
                            title: '实例监控',
                            icon: 'icon_menu_instance',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/instanceManage/instanceMonitoring/index.vue')
                    }
                ]
            },
            {
                path: '/gpuImage',
                name: 'GpuImage',
                meta: {
                    title: '镜像管理',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/gpuImage',
                        name: 'GpuImage',
                        meta: {
                            cache: true,
                            title: '镜像管理',
                            icon: 'icon_menu_image',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/gpuImage/index.vue')
                    },
                ]
            },
            {
                path: '/storage',
                name: 'storage',
                meta: {
                    title: '网盘存储',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/storage',
                        name: 'storage',
                        meta: {
                            cache: true,
                            title: '网盘存储',
                            icon: 'icon_menu_storage',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/storage/index.vue')
                    },
                ]
            },
            {
                path: '/costCenter',
                name: 'CostCenter',
                meta: {
                    title: '费用中心',
                    requiresAuth: true,
                },
                children: [
                    {
                        path: '/costCenter',
                        name: 'CostCenter',
                        meta: {
                            title: '费用中心',
                            icon: 'icon_cost_center',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/costManage/costCenter.vue')
                    },
                ]
            },
            {
                path: '/cost',
                name: 'cost',
                meta: {
                    title: '费用',
                    requiresAuth: true,
                },
                children: [
                    {
                        path: '/cost',
                        name: 'cost',
                        meta: {
                            title: '费用',
                            icon: 'icon_cost_center',
                            requiresAuth: true,
                           
                        },
                        children: [
                            {
                                path: '/costDetail',
                                name: 'CostDetail',
                                meta: {
                                    title: '费用明细',
                                    icon: 'icon_cost_detail',
                                    requiresAuth: true,
                                },
                                component: () => import('@/views/console/costManage/costDetail.vue')
                            },
                            {
                                path: '/orderDetail',
                                name: 'OrderDetail',
                                hidden: true,
                                meta: {
                                    cache: true,
                                    title: '订单详情',
                                    requiresAuth: true,
                                },
                                component: () => import('@/views/console/costManage/orderDetails.vue')
                            },
                            {
                                path: '/withdrawal',
                                name: 'Withdrawal',
                                hidden: true,
                                meta: {
                                    cache: true,
                                    title: '提现',
                                    requiresAuth: true,
                                },
                                component: () => import('@/views/console/costManage/withdrawal.vue')
                            },
                            {
                                path: '/invoice',
                                name: 'Invoice',
                                meta: {
                                    title: '发票',
                                    icon: 'icon_invoice',
                                    requiresAuth: true,
                                },
                                component: () => import('@/views/console/costManage/invoice/index.vue')
                            },
                            {
                                path: '/applyInvoice',
                                name: 'ApplyInvoice',
                                hidden: true,
                                meta: {
                                    title: '申请开票',
                                    icon: 'icon_invoice',
                                    requiresAuth: true,
                                },
                                component: () => import('@/views/console/costManage/invoice/applyInvoice.vue')
                            },
                            {
                                path: '/addressList',
                                name: 'AddressList',
                                hidden: true,
                                meta: {
                                    title: '管理发票信息地址',
                                    icon: 'icon_invoice',
                                    requiresAuth: true,
                                },
                                component: () => import('@/views/console/costManage/invoice/addressList.vue')
                            },
                            {
                                path: '/invoiceList',
                                name: 'InvoiceList',
                                hidden: true,
                                meta: {
                                    title: '发票列表',
                                    icon: 'icon_invoice',
                                    requiresAuth: true,
                                },
                                component: () => import('@/views/console/costManage/invoice/invoiceList.vue')
                            },
                            {
                                path: '/voucher',
                                name: 'Voucher',
                                meta: {
                                    title: '代金券',
                                    icon: 'icon_menu_voucher',
                                    requiresAuth: true,
                                },
                                component: () => import('@/views/console/costManage/voucher/index.vue')
                            }
                        ]
                    },
                ]
            },
            {
                path: '/account',
                name: 'Account',
                meta: {
                    title: '账户中心',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/account',
                        name: 'Account',
                        meta: {
                            title: '账户中心',
                            icon: 'icon_menu_user',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/account/index.vue')
                    },
                    {
                        path: '/studentAuthentication',
                        name: 'StudentAuthentication',
                        hidden: true,
                        meta: {
                            title: '学生认证',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/account/studentAuthentication.vue')
                    },
                    {
                        path: '/enterpriseauthentication',
                        name: 'Enterpriseauthentication',
                        hidden: true,
                        meta: {
                            title: '企业认证',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/account/enterpriseauthentication.vue')
                    }
                ]
            },
            {
                path: '/workOrder',
                name: 'WorkOrder',
                meta: {
                    title: '工单列表',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/workOrder',
                        name: 'WorkOrder',
                        meta: {
                            icon: 'icon_menu_order',
                            title: '工单列表',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/workOrder/orderList.vue')
                    },
                    {
                        path: '/addWorkOrder',
                        name: 'AddWorkOrder',
                        hidden: true,
                        meta: {
                            title: '提交工单',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/workOrder/addWorkOrder.vue')
                    },
                    {
                        path: '/issueGuide',
                        name: 'IssueGuide',
                        hidden: true,
                        meta: {
                            title: '创建工单',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/workOrder/issueGuide.vue')
                    },
                    {
                        path: '/workOrderDetails',
                        name: 'WorkOrderDetails',
                        hidden: true,
                        meta: {
                            title: '工单详情',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/workOrder/workOrderDetails.vue')
                    },
                ]
            },
            {
                path: '/promotionBenefits',
                name: 'PromotionBenefits',
                meta: {
                    title: '推广福利',
                    requiresAuth: true,
                },
                children: [
                    {
                        path: '/promotionBenefits',
                        name: 'PromotionBenefits',
                        meta: {
                            icon: 'icon_menu_promotionBenefits',
                            title: '推广福利',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/promotionBenefits/index.vue')
                    }
                ]
            },
            {
                path: '/ambassador',
                name: 'Ambassador',
                meta: {
                    title: '云大使',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/ambassador',
                        name: 'Ambassador',
                        meta: {
                            icon: 'icon_menu_ambassador',
                            title: '云大使',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/ambassador/index.vue')
                    },
                    {
                        path: '/costAccount',
                        name: 'CostAccount',
                        hidden: true,
                        meta: {
                            cache: true,
                            title: '账户管理',
                            hidden: true,
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/costManage/costAccount.vue')
                    },
                    {
                        path: '/applyWithdrawal',
                        name: 'applyWithdrawal',
                        hidden: true,
                        meta: {
                            title: '申请提现',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/ambassador/applyWithdrawal.vue')
                    },
                ]
            },
            {
                path: '/messageCenter',
                name: 'MessageCenter',
                meta: {
                    title: '通知中心',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/messageCenter',
                        name: 'MessageCenter',
                        meta: {
                            icon: 'icon_menu_message',
                            title: '通知中心',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/messageCenter/messageList.vue')
                    },
                    {
                        path: '/messageSet',
                        name: 'MessageSet',
                        hidden: true,
                        meta: {
                            title: '通知设置',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/messageCenter/messageSet.vue')
                    },
                    {
                        path: '/messageDetails',
                        name: 'MessageDetails',
                        hidden: true,
                        meta: {
                            title: '通知详情',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/messageCenter/messageDetails.vue')
                    },
                ]
            },

            {
                path: '/recharge',
                name: 'Recharge',
                meta: {
                    title: '充值',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/recharge',
                        name: 'Recharge',
                        hidden: true,
                        meta: {
                            icon: 'icon_menu_order',
                            title: '充值',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/recharge/index.vue')
                    }
                ]
            },
            {
                path: '/memberBenefits',
                name: 'MemberBenefits',
                meta: {
                    title: '会员权益',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/memberBenefits',
                        name: 'MemberBenefits',
                        hidden: true,
                        meta: {
                            icon: 'icon_menu_memberBenefits',
                            title: '会员权益',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/console/memberBenefits/index.vue')
                    }
                ]
            }
        ]
    }
]

export default frameControl
